/**
 * Created by sergey on 6/18/14.
 */
public class Report implements Comparable<Report>{

    // вахтер
    private String nameJanitor;

    // человек взявший ключ
    private String namePersonnel;

    // дата взятия(принятия) ключа
    private long date;

    // именование ключа
    private String nameKey;

    private String status;

    public Report() {
    }

    public Report(String nameJanitor, String namePersonnel, long date, String nameKey, String status) {
        this.nameJanitor = nameJanitor;
        this.namePersonnel = namePersonnel;
        this.date = date;
        this.nameKey = nameKey;
        this.status = status;
    }

    public String getNameJanitor() {
        return nameJanitor;
    }

    public void setNameJanitor(String nameJanitor) {
        this.nameJanitor = nameJanitor;
    }

    public String getNamePersonnel() {
        return namePersonnel;
    }

    public void setNamePersonnel(String namePersonnel) {
        this.namePersonnel = namePersonnel;
    }

    public long getDate() {
        return date;
    }

    public void setDate(long date) {
        this.date = date;
    }

    public String getNameKey() {
        return nameKey;
    }

    public void setNameKey(String nameKey) {
        this.nameKey = nameKey;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public int compareTo(Report o) {
        if(o.date>date){
            return -1;
        }else if(o.date==date){
            return 0;
        }else{
            return 1;
        }
    }
}
